package com.jijs.guava.base;

import com.google.common.escape.Escaper;
import com.google.common.html.HtmlEscapers;

/**
 * Created by jjs on 2016/12/31.
 * HtmlEscapers工具类
 */
public class HtmlEscapersTest {

    /**
     * 将html转义如下源码所示
     */
    public static void escape(){
        Escaper htmlEscaper =HtmlEscapers.htmlEscaper();
        System.out.println(htmlEscaper.escape("<a>你好</a>"));
    }

    public static void main(String[] args) {
        escape();
    }
}
